#ifndef UNIONTECCONTROLLERHMIDLL_H
#define UNIONTECCONTROLLERHMIDLL_H

#include <QObject>
#include <QWidget>


#define TecControllerHMI_IDD "TecControllerHMI_idd"

class TecControllerHMI : public QWidget{
Q_OBJECT
public:
     ~TecControllerHMI() {}
     TecControllerHMI()  {}

     virtual QWidget* RegisiterUi() = 0;

     virtual void FastTimerLoop() = 0;
     virtual void SlowTimerLoop() = 0;

     virtual void onbtnclicked_ModeSelected(short Mode) = 0;
     virtual bool onbtnclicked_vPower() = 0;
     virtual bool onbtnclicked_ESTOP_Clicked() = 0;

     virtual void onbtnclicked_Setting() = 0;
     virtual void onbtnclicked_Edit() = 0;
     virtual void onbtnclicked_Pause() = 0;
     virtual void onbtnclicked_Run() = 0;
     virtual void onbtnclicked_Stop() = 0;

     virtual void onbtnclicked_fn1() = 0;
     virtual void onbtnclicked_fn2() = 0;
     virtual void onbtnclicked_fn3() = 0;
     virtual void onbtnclicked_fn4() = 0;

     virtual void onbtnpressed_fn1() = 0;
     virtual void onbtnpressed_fn2() = 0;
     virtual void onbtnpressed_fn3() = 0;
     virtual void onbtnpressed_fn4() = 0;

     virtual void onbtnreleased_fn1() = 0;
     virtual void onbtnreleased_fn2() = 0;
     virtual void onbtnreleased_fn3() = 0;
     virtual void onbtnreleased_fn4() = 0;

     virtual void onbtnclicked_Home() = 0;

     virtual void onbtnclicked_MainScriptStatus() = 0;
     virtual void onbtnclicked_SubScriptStatus() = 0;
     virtual void onbtnclicked_VisHmi() = 0;
     virtual void onbtnclicked_Coordinate(short& Coordinate,int& ToolId, int& WorkID) = 0;

     virtual void onbtnpressed_XP() = 0;
     virtual void onbtnpressed_YP() = 0;
     virtual void onbtnpressed_ZP() = 0;
     virtual void onbtnpressed_AP() = 0;
     virtual void onbtnpressed_BP() = 0;
     virtual void onbtnpressed_CP() = 0;
     virtual void onbtnpressed_XN() = 0;
     virtual void onbtnpressed_YN() = 0;
     virtual void onbtnpressed_ZN() = 0;
     virtual void onbtnpressed_AN() = 0;
     virtual void onbtnpressed_BN() = 0;
     virtual void onbtnpressed_CN() = 0;

     virtual void onbtnpressed_E1P() = 0;
     virtual void onbtnpressed_E2P() = 0;
     virtual void onbtnpressed_E1N() = 0;
     virtual void onbtnpressed_E2N() = 0;

     virtual void onbtnreleased_XP() = 0;
     virtual void onbtnreleased_YP() = 0;
     virtual void onbtnreleased_ZP() = 0;
     virtual void onbtnreleased_AP() = 0;
     virtual void onbtnreleased_BP() = 0;
     virtual void onbtnreleased_CP() = 0;
     virtual void onbtnreleased_XN() = 0;
     virtual void onbtnreleased_YN() = 0;
     virtual void onbtnreleased_ZN() = 0;
     virtual void onbtnreleased_AN() = 0;
     virtual void onbtnreleased_BN() = 0;
     virtual void onbtnreleased_CN() = 0;

     virtual void onbtnreleased_E1P() = 0;
     virtual void onbtnreleased_E2P() = 0;
     virtual void onbtnreleased_E1N() = 0;
     virtual void onbtnreleased_E2N() = 0;

     virtual void onbtnclicked_MannualOverrideP(double& value) = 0;
     virtual void onbtnclicked_ProgramOverrideP(double& value) = 0;
     virtual void onbtnclicked_MannualOverrideN(double& value) = 0;
     virtual void onbtnclicked_ProgramOverrideN(double& value) = 0;
     virtual void fromBackendMessageCommand(QByteArray Data) = 0;
     virtual void toBackendMessage(QByteArray& Data) = 0;
};

Q_DECLARE_INTERFACE(TecControllerHMI, TecControllerHMI_IDD)


class UnionTecControllerHMIDLL : public TecControllerHMI{
Q_OBJECT
Q_PLUGIN_METADATA(IID "TecControllerHMI_idd" )
Q_INTERFACES(TecControllerHMI)

public:
    UnionTecControllerHMIDLL();
    ~UnionTecControllerHMIDLL();

    QWidget* RegisiterUi();

    void FastTimerLoop();
    void SlowTimerLoop();

    void onbtnclicked_ModeSelected(short Mode);
    bool onbtnclicked_vPower();
    bool onbtnclicked_ESTOP_Clicked();

    void onbtnclicked_Setting();
    void onbtnclicked_Edit();
    void onbtnclicked_Pause();
    void onbtnclicked_Run();
    void onbtnclicked_Stop();

    void onbtnclicked_fn1();
    void onbtnclicked_fn2();
    void onbtnclicked_fn3();
    void onbtnclicked_fn4();

    void onbtnpressed_fn1();
    void onbtnpressed_fn2();
    void onbtnpressed_fn3();
    void onbtnpressed_fn4();

    void onbtnreleased_fn1();
    void onbtnreleased_fn2();
    void onbtnreleased_fn3();
    void onbtnreleased_fn4();

    void onbtnclicked_Home();

    void onbtnclicked_MainScriptStatus();
    void onbtnclicked_SubScriptStatus();
    void onbtnclicked_VisHmi();
    void onbtnclicked_Coordinate(short& Coordinate,int& ToolId, int& WorkID);

    void onbtnpressed_XP();
    void onbtnpressed_YP();
    void onbtnpressed_ZP();
    void onbtnpressed_AP();
    void onbtnpressed_BP();
    void onbtnpressed_CP();
    void onbtnpressed_XN();
    void onbtnpressed_YN();
    void onbtnpressed_ZN();
    void onbtnpressed_AN();
    void onbtnpressed_BN();
    void onbtnpressed_CN();

    void onbtnpressed_E1P();
    void onbtnpressed_E2P();
    void onbtnpressed_E1N();
    void onbtnpressed_E2N();

    void onbtnreleased_XP();
    void onbtnreleased_YP();
    void onbtnreleased_ZP();
    void onbtnreleased_AP();
    void onbtnreleased_BP();
    void onbtnreleased_CP();
    void onbtnreleased_XN();
    void onbtnreleased_YN();
    void onbtnreleased_ZN();
    void onbtnreleased_AN();
    void onbtnreleased_BN();
    void onbtnreleased_CN();

    void onbtnreleased_E1P();
    void onbtnreleased_E2P();
    void onbtnreleased_E1N();
    void onbtnreleased_E2N();

    void onbtnclicked_MannualOverrideP(double& value);
    void onbtnclicked_ProgramOverrideP(double& value);
    void onbtnclicked_MannualOverrideN(double& value);
    void onbtnclicked_ProgramOverrideN(double& value);

    void fromBackendMessageCommand(QByteArray Data);
    void toBackendMessage(QByteArray& Data);
};

#endif // UNIONTECCONTROLLERHMIDLL_H
